package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysSettingsMapper;
import com.ruoyi.system.domain.SysSettings;
import com.ruoyi.system.service.ISysSettingsService;

/**
 * 网站信息Service业务层处理
 *
 * @author king
 * @date 2022-07-15
 */
@Service
public class SysSettingsServiceImpl extends ServiceImpl<SysSettingsMapper,SysSettings> implements ISysSettingsService
{
    @Autowired
    private SysSettingsMapper sysSettingsMapper;

    /**
     * 查询网站信息
     *
     * @param id 网站信息主键
     * @return 网站信息
     */
    @Override
    public SysSettings selectSysSettingsById(Long id)
    {
        return sysSettingsMapper.selectSysSettingsById(id);
    }

    /**
     * 查询网站信息列表
     *
     * @param sysSettings 网站信息
     * @return 网站信息
     */
    @Override
    public List<SysSettings> selectSysSettingsList(SysSettings sysSettings)
    {
        return sysSettingsMapper.selectSysSettingsList(sysSettings);
    }

    /**
     * 新增网站信息
     *
     * @param sysSettings 网站信息
     * @return 结果
     */
    @Override
    public int insertSysSettings(SysSettings sysSettings)
    {
        sysSettings.setCreateTime(DateUtils.getNowDate());
        return sysSettingsMapper.insertSysSettings(sysSettings);
    }

    /**
     * 修改网站信息
     *
     * @param sysSettings 网站信息
     * @return 结果
     */
    @Override
    public int updateSysSettings(SysSettings sysSettings)
    {
        sysSettings.setUpdateTime(DateUtils.getNowDate());
        return sysSettingsMapper.updateSysSettings(sysSettings);
    }

    /**
     * 批量删除网站信息
     *
     * @param ids 需要删除的网站信息主键
     * @return 结果
     */
    @Override
    public int deleteSysSettingsByIds(Long[] ids)
    {
        return sysSettingsMapper.deleteSysSettingsByIds(ids);
    }

    /**
     * 删除网站信息信息
     *
     * @param id 网站信息主键
     * @return 结果
     */
    @Override
    public int deleteSysSettingsById(Long id)
    {
        return sysSettingsMapper.deleteSysSettingsById(id);
    }
}
